﻿using DTOs;
using System.Linq.Expressions;

namespace RBAC.Domain.Service.Interfae
{
    public interface IUserService
    {
        /// <summary>
        /// 添加用户信息
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        Task<int> AddUser(UserInfo userInfo);
        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        Task<int> UpdateUserInfo(UserInfo userInfo);
        /// <summary>
        /// 反填用户信息   
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<UserInfo> GetUserAll(UserInfo userInfo);
        /// <summary>
        /// 删除用户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>

        Task<int> DelUser(int id);

        /// <summary>
        /// 显示全部用户信息
        /// </summary>
        /// <returns></returns>
        Task<PageDto<UserDto>> GetAll(int pageSize, int pageIndex);
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="Uname"></param>
        /// <param name="Upwd"></param>
        /// <returns></returns>
        Task<LoginDto> Logain(string Uname, string Upwd);
        /// <summary>
        /// 反填（从Token中取用户ID）1
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<UserInfo> GetUserAlls(int id);
        /// <summary>
        /// 反填（从Token中取用户ID）2
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        Task<List<UserInfo>> GetUserFill(int uid);
        Task<List<UserInfo>> Getalls();


    }
}
